package com.example.trb.util.result;

import org.springframework.http.HttpStatus;

public enum UserReturnCode implements ReturnCode {
    LOGIN_FIRST(HttpStatus.FORBIDDEN.value(), "请先登录"),
    PASSWORD_ERROR(SysReturnCode.BAD_REQUEST.code, "密码错误"),
    USER_NOT_EXIST(SysReturnCode.BAD_REQUEST.code, "用户不存在"),
    OK(SysReturnCode.OK.code, "请求成功"),
    PASSWORD_OR_ACCOUNT_ERROR(SysReturnCode.BAD_REQUEST.code, "密码或账户错误"),
    USER_EXIST(SysReturnCode.BAD_REQUEST.code, "用户已存在");

    public final int code;
    public final String message;

    UserReturnCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }
}
